/*
 * SingleExtentionsEntry.java
 *
 * Created on August 22, 2006, 2:35 PM
 *
 * @author Francois Daniels
 */

package za.gateway.container;

/**
 * This class encaptulates the data regarding a dial element. This 
 * means it represents a single rule for a dial plan. This rule exists 
 * within a context, the context most presumably belongs to a 
 * particular group on the system. This rule stats where to go if the 
 * conditions are met. If they are not met, then the next rule in the 
 * dial plan is executed.
 *
 * @author Francois Daniels
 */
public class SingleExtentionsEntry {
    /** Variables belonging to the SingleExtentionsEntry class */
    
    /**
     * The priority is actually the type is in FORWARD or ALLOW.
     **/
    private int Priority;
    
    /**
     * This is the time at which this extension entry becomes active.
     **/
    private int StartTime;
    
    /**
     * This is the time at which this extension entry deactivates.
     **/
    private int EndTime;
    
    /**
     * This is the number which we will dial to.
     **/
    private String Dialout;
    
    /**
     * This is the day at which this extension entry becomes active.
     **/
    protected String StartDay;
    
    /**
     * This is the day at which this extension entry deactivates.
     **/
    protected String EndDay;
    
    
    /** Functions belonging to the SingleExtentionsEntry class */
    
    /**
     * Creates a new instance of SingleExtentionsEntry.
     *
     * @param PriorityData  This is the type of the restriction. It 
     *                      can be either FORWARD or ALLOW.
     * @param StartTimeData This is the time at which this rule becomes 
     *                      active.
     * @param EndTimeData   This is the time at which this rule 
     *                      deactivates.
     * @param DialoutData   This is the number to which we will dial.
     * @param StartDayData  This is the day on which this rule becomes 
     *                      active.
     * @param EndDayData    This is the day on which this rule 
     *                      deactivates.
     */
    public SingleExtentionsEntry (int PriorityData, int StartTimeData,
            int EndTimeData, String DialoutData, String StartDayData, 
            String EndDayData) {
        Priority = PriorityData;
        StartTime = StartTimeData;
        EndTime = EndTimeData;
        Dialout = DialoutData;
        StartDay = StartDayData;
        EndDay = EndDayData;
    }
    
    /**
     * This function will return the day on which this rule becomes 
     * active. 
     *
     * @return The day on which this rule becomes active.
     */
    public String GetStartDay () {
        return StartDay;
    }
    
    /**
     * This function will return the day on which this rule 
     * deactivates. 
     *
     * @return The day on which this rule becomes deactive.
     */
    public String GetEndDay () {
        return EndDay;
    }
    
    /**
     * This function will return this rule's priority.
     *
     * @return This rule's priority.
     */
    public int GetPriority () {
        return Priority;
    }
    
    /**
     * This function will return the time at which this rule becomes 
     * active. 
     *
     * @return The time at which this rule becomes active.
     */
    public int GetStartTime () {
        return StartTime;
    }
    
    /**
     * This function will return the time at which this rule becomes 
     * deactive. 
     *
     * @return The time at which this rule becomes deactive.
     */
    public int GetEndTime () {
        return EndTime;
    }
    
    /**
     * This function will return the number this rule applies to.
     *
     * @return The number to which this rule applies.
     */
    public String GetDialout () {
        return Dialout;
    }
    
}
